import {defineStore} from "pinia";

export default defineStore("user", {
    state: () => ({
        //用户是否登录
        userLoggedIn: false,
    }),
    actions: {
        async register(values) {
            // await auth.register(values.email, values.password);
            console.log(values)

            this.userLoggedIn = true;
        },
        async login(values) {
            // 请求后端
            // await auth.login(values.email, values.password);
            console.log(values)

            this.userLoggedIn = true;
        },
        logout() {
            this.userLoggedIn = false;
        }
    },
})